import request from "../../utils/request";

const BASE_URL = "maimao_user/web/member";
export default {

    /**
     * 全量分类数
     */
    idCardInfo(id) {
        return request({
            url: `${BASE_URL}/idcard-info?userId=${id}`,
            method: 'get',
        })
    },
    /**
     * 申请开通店铺
     * @returns {AxiosPromise}
     */
    applyShop() {
        return request({
            url: `${BASE_URL}/apply-shop`,
            method: 'post',
        })
    },
    /**
     * 会员注册
     */
    memberRegister(data) {
        return request({
            url: `${BASE_URL}/member-register`,
            method: "post",
            data: data
        })
    },

    /**
     * 查询用户积分
     */
    queryIntegral(userId) {
        return request({
            url: `${BASE_URL}/query-integral?userId=${userId}`,
            method: 'get'
        })
    },

    /**
     * 获取个人基本信息
     */
    fetchBaseInfo() {
        return request({
            url: `${BASE_URL}/baseInfo`,
            method: 'get'
        })
    },

    /**
     * 更新个人信息
     */
    updateBaseInfo(gender, birth) {
        return request({
            url: `${BASE_URL}/updateBaseInfo`,
            method: 'post',
            data: {
                gender,
                birthday: birth
            }
        })
    }


}

